package tgc.edu.exam.entity;

import java.util.ArrayList;
import java.util.List;
import java.util.UUID;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;

import org.springframework.data.annotation.CreatedBy;

import com.fasterxml.jackson.annotation.JsonIgnore;

import tgc.edu.exam.custom.BaseEntity;

/***
 * 课程信息
 * 
 * @author Administrator
 *
 */
@Entity
public class TbCurriculum extends BaseEntity<UUID> {

	private String teachingUnit;// 教学单元
	private String courseName;// 课程名称
	private String overview;// 课程概述
	private String content;// 课程内容
	private int period;// 课时
	private String objective;// 课程目标
	private String difficultylevel;//难易度
	//@JsonIgnore
	private Teacher teacher;	//老师
	/*@JsonIgnore
	private List<Teacher> teachers = new ArrayList<>();*/

	public String getTeachingUnit() {
		return teachingUnit;
	}

	public void setTeachingUnit(String teachingUnit) {
		this.teachingUnit = teachingUnit;
	}

	public String getCourseName() {
		return courseName;
	}

	public void setCourseName(String courseName) {
		this.courseName = courseName;
	}

	public String getOverview() {
		return overview;
	}

	public void setOverview(String overview) {
		this.overview = overview;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public int getPeriod() {
		return period;
	}

	public void setPeriod(int period) {
		this.period = period;
	}

	public String getObjective() {
		return objective;
	}

	public void setObjective(String objective) {
		this.objective = objective;
	}

	public String getDifficultylevel() {
		return difficultylevel;
	}

	public void setDifficultylevel(String difficultylevel) {
		this.difficultylevel = difficultylevel;
	}

	/*@OneToMany(cascade=CascadeType.ALL,mappedBy="curriculum")
	public List<Teacher> getTeachers() {
		return teachers;
	}

	public void setTeachers(List<Teacher> teachers) {
		this.teachers = teachers;
	}*/
	
	@ManyToOne
	@CreatedBy
	public Teacher getTeacher() {
		return teacher;
	}

	public void setTeacher(Teacher teacher) {
		this.teacher = teacher;
	}

}
